# $Id: PKGBUILD 70165 2012-05-01 03:12:33Z ebelanger $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=dvdisaster
pkgver=0.72.4
pkgrel=1
pkgdesc="Provides a margin of safety against data loss on CD and DVD media caused by aging or scratches"
arch=('i686' 'x86_64')
url="http://www.dvdisaster.com/"
license=('GPL')
depends=('gtk2')
options=('!makeflags')
source=(http://dvdisaster.net/downloads/${pkgname}-${pkgver}.tar.bz2 dvdisaster.desktop)
sha1sums=('2b47fb5a5535d90641f24a599cd8ae8ffd86b972'
          'a802dfcee3aa35bdc4b0b5ecabcf32760cd8b992')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
    --mandir=/usr/share/man --docdir=/usr/share/doc \
    --localedir=/usr/share/locale \
    --with-nls=yes 
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make BUILDROOT="${pkgdir}" install
  rm -f "${pkgdir}/usr/bin/dvdisaster-uninstall.sh"
  install -D -m 644 "${srcdir}/dvdisaster.desktop" \
    "${pkgdir}/usr/share/applications/dvdisaster.desktop"
  install -D -m 644 icons/create.png \
    "${pkgdir}/usr/share/pixmaps/dvdisaster.png"
}
